#ifndef PITCHLISTENER_H
#define PITCHLISTENER_H

#include <QObject>
#include <QTimer>
#include <vector>

#include "PitchFinder.h"

class PitchListener : public QObject
{
    Q_OBJECT

public:
    explicit PitchListener(QObject *parent = 0);
	~PitchListener();

public slots:
	void on_pf_PitchFound(double pitch);
	void on_timer_timeout();
	void GetSample();

signals:
	void FinishedSinging(std::vector<double> pitches);

protected:
	bool listening;
	PitchFinder* pf;
	QTimer* timer;
	QTimer* singCheck;
	std::vector<double> samples;
};

#endif // PITCHLISTENER_H
